import React, { Component,TouchableOpacity,BackAndroid} from 'react-native';
import FontIcon from 'react-native-vector-icons/FontAwesome';


const {
  StyleSheet,
  View,
  Text
} = React;

class drawerview extends Component {

	onbtnExit=()=>{
		BackAndroid.exitApp();
	};
	 render() {
	    return (
	      <View style={styles.contain}>
	      	<View style={styles.header}>
	      		<View style={styles.headeruser}>
	      			<View style={styles.headeruserCircle}><FontIcon name="github-alt" size={35} color="white" /></View>
	      			<View style={styles.headruserName}><Text style={styles.text}>测试</Text></View>
	      		</View>
	      		<View style={styles.headerbtns}>
	      			<TouchableOpacity>
	      				<View style={styles.btnlogoff}><Text style={styles.text}>注  销</Text></View>
	      			</TouchableOpacity>
	      			<TouchableOpacity onPress={this.onbtnExit}>
	      				<View style={styles.btnexit}><Text style={styles.text}>退  出</Text></View>
	      			</TouchableOpacity>      			
	      		</View>
	      	</View>
	      	<View style={styles.mainpage}>

	      	</View>
	      </View>
	    );
	}
}

var styles = StyleSheet.create({
	contain:{
		flex:1,
		backgroundColor:'#CDD0DD'
	},
	text:{
		fontSize:17,
		color:'white'
	},
	header:{
		flex:1,
		flexDirection:'row',
		backgroundColor:'#113477'
	},
	headeruser:{
		flex:1,
		//backgroundColor:'red',
		justifyContent:'center',
		alignItems:'center'
	},
	headeruserCircle:{
		width:50,
		height:50,
		borderRadius:25,
		backgroundColor:'#117799',
		justifyContent:'center',
		alignItems:'center'
	},
	headruserName:{
		//flex:1
	},
	headerbtns:{
		flex:2,
		justifyContent:'center',
		alignItems:'center',
		//backgroundColor:'green'
	},
	mainpage:{
		flex:5,
		//backgroundColor:'#92F282'
	},
	btnlogoff:{
		justifyContent:'center',
		alignItems:'center',
		width:100,
		height:25,
		backgroundColor:'#F5A129',
		marginVertical:5,
		elevation:10
	},
	btnexit:{
		justifyContent:'center',
		alignItems:'center',
		width:100,
		height:25,
		backgroundColor:'#E72222',
		marginVertical:5,
		elevation:10
	}
});


export default drawerview;
